.TH std::basic_format_args 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::basic_format_args \- std::basic_format_args

.SH Synopsis
   Defined in header <format>
   template< class Context >                                     \fB(1)\fP \fI(since C++20)\fP
   class basic_format_args;
   using format_args = basic_format_args<std::format_context>;   \fB(2)\fP \fI(since C++20)\fP
   using wformat_args = basic_format_args<std::wformat_context>; \fB(3)\fP \fI(since C++20)\fP

   Provides access to formatting arguments.

.SH Member functions

   constructor   constructs a basic_format_args object
                 \fI(public member function)\fP
   get           returns formatting argument at the given index
                 \fI(public member function)\fP

std::basic_format_args::basic_format_args

   basic_format_args() noexcept;                                                   \fB(1)\fP
   template< class... Args >
   basic_format_args( const /*format-arg-store*/<Context, Args...>& store )        \fB(2)\fP
   noexcept;

   1) Constructs a basic_format_args object that does not hold any formatting argument.
   2) Constructs a basic_format_args object from the result of a call to
   std::make_format_args or std::make_wformat_args.

   std::basic_format_args has reference semantics. It is the programmer's
   responsibility to ensure that *this does not outlive store (which, in turn, should
   not outlive the arguments to std::make_format_args or std::make_wformat_args).

std::basic_format_args::get

   std::basic_format_arg<Context> get( std::size_t i ) const noexcept;

   Returns a std::basic_format_arg holding the i-th argument in args, where args is the
   parameter pack passed to std::make_format_args or std::make_wformat_args.

   If there's no such formatting argument (i.e. *this was default-constructed or i is
   not less than the number of formatting arguments), returns a default-constructed
   std::basic_format_arg (holding a std::monostate object).

   Deduction guides

   template< class Context, class... Args >
   basic_format_args( /*format-arg-store*/<Context, Args...> ) ->         \fI(since C++20)\fP
   basic_format_args<Context>;

.SH Example

    This section is incomplete
    Reason: no example

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

     DR    Applied to              Behavior as published               Correct behavior
   P2216R3 C++20      format_args_t was provided due to                removed
                      overparameterization of vformat_to
   LWG3810 C++20      basic_format_args has no deduction guide         added

.SH See also

   basic_format_arg class template that provides access to a formatting argument for
   (C++20)          user-defined formatters
                    \fI(class template)\fP

.SH Category:
     * Todo no example
